package com.cli.springboot_stater;

import com.cli.springboot_stater.config.HelloProperties;
import com.cli.springboot_stater.service.HelloService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;

/**
 * 定义为配置类
 */
@Configuration
/**
 * 在Web工程条件下成立
 */
@ConditionalOnWebApplication
/**
 * 启用HelloProperties配置功能，并加入到ICO容器中
 */
@EnableConfigurationProperties({HelloProperties.class})
/**
 * 导入HelloService组件
 */
@Import(HelloService.class)
public class HelloAutoConfiguration {
}
